<%@page import="com.thinktank.dao.BoardDao"%>
<%@page import="com.thinktank.vo.Board"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>



<html>
<head>
	<title>수정</title>
<style type="text/css">

	* {
	background: #f4f4f4;
	color:#555;
	}
	
	a{
	text-decoration: none;
	}
	
	a:hover {
	font-weight: bold;
	}
	
	h1 {
	 font-weight: normal;
	 margin-top: -5px;
	 font-size: 1.9em; 
	 color: #000;
	}
	
	#board_intro {
	padding: 0 0 20px; 
	margin: 0 0 25px;
	border-bottom: 1px dotted #ddd; 
	}
	#board_introsub {
	font: .8em Arial, Verdana, Tahoma, Sans-Serif; 
	color: #555;
	}
	
	#write{
	padding:auto;
	margin: auto;	
	}

	form div.dynamiclabel{ /* div container for each form field with pop up label */
	display: block;
	margin: 30px;
	font: 16px;
	position: relative;
	}
	form div.dynamiclabel input[type="text"], form div.dynamiclabel textarea{
	width: 600px;
	padding: 10px;
	border: 1px solid #c3c3c3;
	border-radius: 7px;
	}
	form div.dynamiclabel textarea{
	height: 300px;
	padding: 10px;
	line-height: 20px;
	}
	form div.dynamiclabel label{ /* pop up label style */
	position: absolute;
	left: 0;
	background: lightyellow;
	border: 1px solid yellow;
	border-radius: 2px;
	padding: 3px 10px;
	box-shadow: 4px 1px 5px gray;
	font-weight: bold;
	-webkit-backface-visibility: hidden;
	top: 10px; /* initial top position of label relative to dynamiclabel container */
	-moz-transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
	-webkit-transition: all 0.4s ease-in-out; /* Safari doesn't seem to support cubic-bezier values beyond 0 to 1, so use keyword value instead */
	-o-transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
	transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
	opacity: 0;
	z-index: -1;
	}
	form div.dynamiclabel > *:focus{ /* when user focuses on child element inside div.dynamiclabel */
	border: 1px solid #45bcd2;
	box-shadow: 0 0 8px 2px #98d865;
	}
	form div.dynamiclabel > *:focus + label{ /* label style when user focuses on child element inside div.dynamiclabel */
	opacity: 1;
	z-index:100;
	top: -35px; /* Post top position of label on focus relative to dynamiclabel container */
	-ms-transform: rotate(-3deg);
	-moz-transform: rotate(-3deg);
	-webkit-transform: rotate(-3deg);
	transform: rotate(-3deg);
	}
	
	#board_Subject,
	#board_Content{
		background-color: white;
	}
	
	#board_img{
		margin-bottom: 20px;
	}
	
	#bImg{
		color: red;
	}
	
	#board_submit{
		margin-top: 10px;
		text-align: center;
	}

	#board_select {
		border: solid 1px #E5E5E5;
		width: 70px;
		height: 28px;
		font-size:13px;
		text-align: center;
		background: #FFFFFF;
	}
	
	#board_ok{
		border: 0;
	}
	
	.board_button{
		font: 1.0em Arial, Verdana, Tahoma, Sans-Serif; 
	}
	
</style>
<script type="text/javascript">
window.onload = function() {
	var board_ok = document.getElementById("board_ok");
	board_ok.onmouseover = function() {
		board_ok.style.cursor = "pointer";
		board_ok.style.fontWeight = "bold";
		board_ok.onmouseout = function() {
			board_ok.style.fontWeight = "normal";
		};
	};
};
</script>
</head>

<body>
	<div id="board_intro">
		<h1>
			<a href="boardReg.jsp">Board New Write</a>
		</h1>
		<p id="board_introsub">게시판을 남겨주세요 ( Please, write the board page )</p>
	</div>
	<div id="write">
		<form action="boardEditProcess.do" method="post">

			<div id="board_formwrapper">
				<div>
					<label>카테고리: </label>
					<select name="category" id="board_select">	
							<option value="1">스포츠</option>
							<option value="2">영화</option>
							<option value="3">시사</option>											
					</select>
				</div>
				<div class="dynamiclabel">
					<input name="bSubject" id="board_Subject" value="${board.bSubject}" placeholder="게시판 제목" type="text" maxlength="40" />
					<label for="name">제목</label>
				</div>
				<div class="dynamiclabel">
					<textarea name="bContent" id="board_Content" placeholder="게시판 내용을 입력하세요" style="overflow:hidden" onkeydown="limit(this.form)">${board.bContent}</textarea>
					<label for="bContent">내용</label>
				</div>
				<div id="board_img">
					<label>파일첨부: </label>
					<input type="file" name="bImg" id="bImg"  />
				</div>
				<hr style="border:#ddd 1px dotted" />
				<div id="board_submit">
					<input type="hidden" name="bNo" value="${board.bNo}" />
					<input type="submit" value="저장" id="board_ok" class="board_button"  onclick="submit1(this.form)" />&nbsp;&nbsp;
					<a href="boardDetail.do?bNo=${board.bNo}" class="board_button">취소</a>
				</div>
			</div>
		</form>	
	
	</div> <!-- write end -->
	<script>
			document.body.scrollIntoView(true);
			parent.document.all.inner1.height = document.body.scrollHeight;
	</script>
</body>
</html>